package edu.sctu.zhu.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.servlet.configuration.EnableWebMvcSecurity;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Created by zhu on 2015/11/11.
 */
@Configuration
@EnableWebMvcSecurity
@ComponentScan
public class WebResourceConfig extends WebMvcConfigurerAdapter{
    /**
     * {@inheritDoc}
     * <p>This implementation is empty.
     * 配置默认静态资源路径
     * @param registry
     */

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        super.addResourceHandlers(registry);

        registry.addResourceHandler("/**").addResourceLocations("/");
    }
}
